update_content #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: Deploy Quartz site to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Trigger via dispatch | |
| repository_dispatch: | |
| types: [ update_content ] | |
| # Trigger manually from the Actions tab | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Site (Quartz Engine) | |
| uses: actions/checkout@v4 | |
| - name: Checkout Content (Vault) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: NerdBowl/nerd-bowl-vault | |
| path: vault-temp # Checkout to a temporary directory | |
| token: ${{ secrets.VAULT_PAT }} | |
| fetch-depth: 0 | |
| sparse-checkout: | | |
| site | |
| - name: Setup Content | |
| run: | | |
| # Create 'content/' directory | |
| mkdir -p content | |
| # Copy contents of 'site' folder to 'content' | |
| cp -r vault-temp/site/. content/ | |
| # Remove temporary directory | |
| rm -rf vault-temp | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Build Quartz | |
| run: npx quartz build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: public | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |