Skip to content

Commit 8db6455

Browse files
authored
Update GH pages deployment (grimme-lab#106)
1 parent aa89d4b commit 8db6455

1 file changed

Lines changed: 32 additions & 10 deletions

File tree

.github/workflows/docs.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,45 @@
11
name: docs
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['*']
7+
pull_request:
8+
9+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
10+
concurrency:
11+
group: pages-${{ github.ref }}
12+
cancel-in-progress: true
413

514
jobs:
6-
build-and-deploy:
15+
build:
716
runs-on: ubuntu-latest
817
steps:
9-
- uses: actions/checkout@v2
10-
- uses: actions/setup-python@v1
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
1120
with:
1221
python-version: '3.x'
1322
- name: Install dependencies
1423
run: pip install ford
1524
- name: Build Documentation
1625
run: ford docs.md
17-
- uses: JamesIves/github-pages-deploy-action@3.7.1
18-
if: github.event_name == 'push' && github.repository == 'grimme-lab/mctc-lib' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/main' )
26+
- name: Upload artifact
27+
if: github.event_name == 'push' && github.repository == 'grimme-lab/mctc-lib'
28+
uses: actions/upload-pages-artifact@v3
1929
with:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
BRANCH: gh-pages
22-
FOLDER: _docs
23-
CLEAN: true
30+
path: _docs
31+
32+
deploy:
33+
if: github.event_name == 'push' && github.repository == 'grimme-lab/mctc-lib'
34+
needs: build
35+
runs-on: ubuntu-latest
36+
permissions:
37+
pages: write
38+
id-token: write
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)