-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: automatically parse and deploy site
- Loading branch information
Adrien Bestel
committed
Dec 12, 2024
1 parent
6484161
commit 3439f74
Showing
3 changed files
with
73 additions
and
559 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,72 @@ | ||
name: Publish to GitHub Pages | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
name: Build Antora Site | ||
runs-on: truck-ai-runner-dev | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: package.json | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Generate Site | ||
run: | | ||
yarn parse | ||
zip -r site.zip docs | ||
- name: Upload Site | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | ||
with: | ||
name: site.zip | ||
path: site.zip | ||
if-no-files-found: error | ||
|
||
|
||
publish: | ||
name: Publish to GitHub Pages | ||
if: github.ref_name == 'main' | ||
needs: [ build ] | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Download Site | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | ||
with: | ||
name: site.zip | ||
|
||
- name: Unzip Site | ||
run: unzip site.zip -d site | ||
|
||
- name: Configure Pages | ||
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5 | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2 | ||
with: | ||
path: site | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@13b55b33dd8996121833dbc1db458c793a334630 # v3 |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
.DS_Store | ||
.idea/ | ||
docs/output-data.json |
Oops, something went wrong.