Switch pages deployment from branch to actions

This commit is contained in:
Tobias Gruetzmacher 2024-05-14 00:16:18 +02:00
parent dce299903b
commit 7d7166af6e
No known key found for this signature in database

View file

@ -5,12 +5,19 @@ on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -28,10 +35,24 @@ jobs:
pip install wheel
pip install git+https://github.com/spanezz/staticsite.git@v2.3
ssite build --output public
cd public
rm -rf Jenkinsfile dosagelib scripts tests
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
cname: dosage.rocks
github_token: ${{ secrets.GITHUB_TOKEN }}
exclude_assets: 'Jenkinsfile,dosagelib,scripts,setup.*,tests,*.ini'
path: public
deploy:
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