Skip to content

Commit

Permalink
Add publishing to pages
Browse files Browse the repository at this point in the history
  • Loading branch information
llvm-beanz committed Oct 30, 2024
1 parent 4ec61cd commit 465fc24
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/html-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Rebuild all with asciidoctor

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

on:
push:
Expand All @@ -13,6 +16,11 @@ on:
branches:
- main

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Build job
build:
Expand All @@ -28,9 +36,23 @@ jobs:
run: |
find . -name "*.asciidoc" -exec touch {} \;
make all
- name: Upload Artifact
uses: actions/upload-artifact@v4
if: always()
find . -type d -exec mkdir -p ../_site/{} \;
find . -name "*.html" -exec cp {} ../_site/{} \;
find ../_site -type d -empty -delete
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: HTML
path: ${{github.workspace}}/**/*.html
path: ../_site

# Deployment job
deploy:
if: ${{ github.event_name == 'push'}}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 465fc24

Please sign in to comment.