Skip to content

Update common-issues.md #168

Update common-issues.md

Update common-issues.md #168

name: Build and Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm install js-yaml @octokit/rest
- name: Run fetchStructure.mjs
run: node .github/scripts/fetchStructure.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
- name: Run build-deploy.mjs
run: node .github/scripts/build-deploy.mjs
env:
PUBLISH_DIR: deploy
PUBLISH_BRANCH: gh-pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: deploy # Publish to the deploy folder
publish_branch: gh-pages # Specify the gh-pages branch
- name: Cleanup old workflow runs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
echo "Installing octokit"
npm install @octokit/rest
echo "Running delete-old-runs.mjs"
node .github/scripts/delete-old-runs.mjs