... #322
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
repository_dispatch: ~ | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v4 | |
- name: Clean previous | |
run: | | |
export CI_PAGES_TOKEN="${{secrets.GITHUB_TOKEN}}" | |
./generate _site https://gitlab.maisondelasimulation.fr pdidev%2Fpdi | |
find data -mindepth 1 -maxdepth 1 -exec cp -r '{}' _site ';' | |
./gen_sitemap _site | |
- name: Upload page artifact | |
uses: actions/upload-pages-artifact@v3 | |
publish: | |
needs: build | |
if: "github.event_name != 'pull_request'" | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |