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