Update CI

This commit is contained in:
Matei Adriel 2023-10-29 05:57:20 +01:00
parent 35a2eb300c
commit b7db1dfdb3
No known key found for this signature in database
2 changed files with 20 additions and 25 deletions

View file

@ -1,9 +1,14 @@
name: Build
name: Build and deploy
on:
push:
pull_request:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
@ -20,3 +25,17 @@ jobs:
uses: actions/upload-pages-artifact@v2
with:
path: ./result/www
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

View file

@ -1,24 +0,0 @@
# Inspired by https://github.com/actions/starter-workflows/blob/main/pages/mdbook.yml
name: Deploy
on:
push:
branches: [$default-branch]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
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@v2