Skip to content

Commit

Permalink
ci: add workflow for deploying modules to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Apr 22, 2024
1 parent f84cf8c commit ec397a0
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy
on:
workflow_dispatch:
push:
branches: [main]
jobs:
deploy-pages:
name: Deploy Pages
runs-on: ubuntu-latest
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deploy-pages.outputs.page_url }}
concurrency:
group: pages
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4.1.2
with:
fetch-depth: 0

- name: Copy Modules
run: |
mkdir -p build/page
cp cmake/SetupGo.cmake build/page/$(git branch --show-current)
for tag in $(git tag); do
git checkout $tag
cp cmake/SetupGo.cmake build/page/$tag
done
- name: Upload Documentation
uses: actions/upload-pages-artifact@v3.0.1
with:
path: build/page

- name: Deploy Pages
id: deploy-pages
uses: actions/deploy-pages@v4.0.5

0 comments on commit ec397a0

Please # to comment.