Commit #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build the docs | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| strategy: | |
| matrix: | |
| node-version: [16.x] | |
| steps: | |
| - name: Checkout main branch 🛎️ | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} ⚙️ | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install and Build Frontend 🏗️ | |
| run: | | |
| npm install --ignore-engines | |
| npm run build | |
| - name: Commit and Push to Deploy Branch 🚀 | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git checkout -B deploy | |
| git add . | |
| git add -f build | |
| git commit -m "${{ github.sha }} [Run build for commit]" || echo "No changes to commit" | |
| git push -f origin deploy |