forked from DragonHPC/dragon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added workflow to build and deploy pages
- Loading branch information
1 parent
d215698
commit b176e86
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
name: pages-build-deployment | ||
run-name: pages build and deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- docs | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: docs | ||
submodules: 'recursive' | ||
|
||
- name: Build Image | ||
run: | | ||
docker build -t my_image ./.devcontainer | ||
- name: Run Container | ||
run: | | ||
docker run -t -d --name my_container my_image | ||
- name: Build | ||
run: | | ||
set -x | ||
docker exec -i my_container mkdir dragon | ||
docker cp ./ my_container:/dragon | ||
docker exec -i my_container bash -c "cd dragon && source /etc/profile.d/modules.sh && source hack/clean_build && cd doc && make" | ||
docker cp my_container:/dragon/doc . | ||
rm -rf ./external | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v5 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: . | ||
|
||
# Deployment job | ||
deploy: | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
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 |