# This workflow builds and deploys the Quartz site to GitHub Pages. # It is triggered on a schedule, on pushes to the main branch, version tags, and releases. # It also allows manual triggering with an input for the environment. # The workflow consists of two jobs: build and deploy. # # Based on https://github.com/marketplace/actions/build-quartz-for-github-pages # name: Build Quartz Site on: push: branches: - main - release/* # Publish semver tags as releases. tags: [ 'v*.*.*' ] paths: - '**' pull_request: branches: [ "main" ] release: types: [published] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: inputs: environment: description: 'The environment to deploy to' required: true default: 'production' # Permissions required for the workflow permissions: contents: read pages: write id-token: write # Concurrency ensures that only one workflow run is active at a time for the same group concurrency: group: "pages" cancel-in-progress: false # Define the jobs for the workflow jobs: # Build and Deploy Quartz Site from the obsidian /docs folder build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Pages uses: actions/configure-pages@v5 - name: Build uses: konstfish/quartz-build-action@v6 with: source: . # page title to be displayed in the browser page_title: "Journal of The NetYeti" quartz_config: .github/quartz/quartz.config.ts quartz_layout: .github/quartz/quartz.layout.ts quartz_icon: .github/quartz/icon.png quartz_custom_css: .github/quartz/custom.scss #quartz_banner: banner.png # See https://github.com/marketplace/actions/build-quartz-for-github-pages - name: Upload artifact uses: actions/upload-pages-artifact@v3 # Deploy the built site to GitHub Pages deploy: runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} # Needs more cowbell here!