Skip to content

Update guildRandomID.md (#228) #511

Update guildRandomID.md (#228)

Update guildRandomID.md (#228) #511

Workflow file for this run

name: Deploy to GitHub Pages πŸš€
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
PUBLIC_BUILD_TIME: ${{ github.event.head_commit.timestamp }}
PUBLIC_COMMIT: ${{ github.sha }}
GHTOKEN: ${{ secrets.GHTOKEN }}
PUBLIC_ENV: "production"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: πŸ“ Modify Environment variables (commit)
id: vars
run: |
shortCommit=$(git rev-parse --short ${{ github.sha }})
echo "::set-env name=PUBLIC_COMMIT::$shortCommit"
- name: πŸ“ Modify Environment variables (time)
id: time
run: |
time=$(date +'%d/%m/%Y %H:%M:%S')
echo "::set-env name=PUBLIC_BUILD_TIME::$time"
- name: πŸ“ Set Environment variables
run: |
echo "PUBLIC_BUILD_TIME: $PUBLIC_BUILD_TIME"
echo "PUBLIC_COMMIT: $PUBLIC_COMMIT"
echo "PUBLIC_ENV: $PUBLIC_ENV"
- name: βš™οΈ Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: "./package-lock.json"
- name: npm bug
shell: "bash"
run: |
rm -rf node_modules
rm -f package-lock.json
- name: ♻️ Install Packages
shell: "bash"
run: |
npm install --legacy-peer-deps
npm install react-dom --legacy-peer-deps
- name: πŸ§‘β€πŸ’» Build
shell: "bash"
run: npm run build
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: ./dist
deploy:
needs: build
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: πŸš€ Deploy to Github
id: deployment
uses: actions/deploy-pages@v4
- name: Wait for site to be deployed
if: 1 == 2
run: sleep 5
- name: πŸ”Ž Update Algolia Crawler (skip)
if: 1 == 2
uses: algolia/algoliasearch-crawler-github-actions@v1.1.0
id: algolia_crawler
with:
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
site-url: "https://aoi.js.org"
crawler-name: aoi-js-org