try other deploy approach

This commit is contained in:
Felix Geisendörfer 2022-12-27 15:23:57 +01:00
parent b4f5056699
commit deadb69ee7

View file

@ -1,26 +1,44 @@
name: GitHub Pages
name: Deploy to GitHub Pages
on:
# Runs on pushes targeting the default branch
push:
branches:
- sphinx # Set a branch name to trigger deployment
pull_request:
branches: ["sphinx"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Build job
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
if: ${{ github.ref == 'refs/heads/sphinx' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./test
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- run: "mkdir -p _site && echo foo > _site/index.html"
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
# Deployment job
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@v1