Skip to content

Commit

Permalink
init: create github actions file
Browse files Browse the repository at this point in the history
  • Loading branch information
pnck committed Mar 6, 2024
0 parents commit b14db58
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/deploy.yaml
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

0 comments on commit b14db58

Please sign in to comment.