chore: format #31
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: Node CI | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| # Sets permissions of the GITHUB_TOKEN | |
| permissions: | |
| contents: write | |
| id-token: write | |
| deployments: write | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build site | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24.x" | |
| cache: "npm" | |
| - name: Prepare Environment | |
| run: | | |
| npm ci | |
| env: | |
| CI: true | |
| - name: Run docusaurus | |
| run: | | |
| npm run build | |
| env: | |
| CI: true | |
| - name: Upload pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: "./build" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: docusaurus | |
| path: "./build" | |
| # Deployment job | |
| deploy-ssh: | |
| name: Deploy to casparcg.com | |
| environment: | |
| name: casparcg.com | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| name: docusaurus | |
| path: build | |
| - name: Upload | |
| uses: SamKirkland/web-deploy@v1 | |
| with: | |
| target-server: ${{secrets.DEPLOY_SSH_HOST}} | |
| remote-user: ${{secrets.DEPLOY_SSH_USERNAME}} | |
| private-ssh-key: ${{secrets.DEPLOY_SSH_KEY}} | |
| destination-path: ${{secrets.DEPLOY_PATH}} | |
| source-path: build/ | |
| rsync-options: -avvz | |
| - name: Trigger cache-purge | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{secrets.DEPLOY_SSH_HOST}} | |
| username: ${{secrets.DEPLOY_SSH_USERNAME}} | |
| key: ${{secrets.DEPLOY_SSH_KEY}} | |
| script: cache-purge | |