-
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.
- Loading branch information
0 parents
commit b14db58
Showing
1 changed file
with
56 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,56 @@ | ||
name: Deploy Pages | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: ['main'] | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Download a build artifact that was previously uploaded in the workflow by the upload-artifact action | ||
- name: Download Artifact | ||
uses: dawidd6/action-download-artifact@v3 | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
repo: ${{ secrets.SRC_REPO }} | ||
name: public | ||
allow_forks: false | ||
workflow_search: true | ||
workflow_conclusion: success | ||
|
||
- name: Extract | ||
run: | | ||
mkdir public | ||
tar -xf artifact.tar -C public | ||
ls -lh public/ | ||
- name: Setup pages | ||
uses: actions/configure-pages@v4 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'public/' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |