publish.yml (1189B)
1 name: Publish to GitHub Pages 2 on: 3 push: 4 branches: [main] 5 workflow_dispatch: 6 concurrency: 7 group: github-pages 8 cancel-in-progress: false 9 # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 10 permissions: 11 contents: read 12 pages: write 13 id-token: write 14 jobs: 15 build: 16 runs-on: ubuntu-latest 17 environment: 18 name: github-pages 19 url: ${{ steps.deployment.outputs.page_url }} 20 steps: 21 - name: Checkout repository 22 uses: actions/checkout@v4 23 - name: Configure Pages 24 uses: actions/configure-pages@v5 25 - name: Install Node.js 26 uses: actions/setup-node@v4 27 with: 28 node-version: "22" 29 - name: Install Antora 30 run: npm i 31 - name: Generate Site 32 run: npx antora antora-playbook.yml 33 - name: Create CNAME file 34 run: echo docs.midnightthoughts.space > build/site/CNAME 35 - name: Create nojekyll file 36 run: touch build/site/.nojekyll 37 - name: Upload Artifacts 38 uses: actions/upload-pages-artifact@v3 39 with: 40 path: build/site 41 - name: Deploy to GitHub Pages 42 id: deployment 43 uses: actions/deploy-pages@v4