Skip to content

Commit 3584e74

Browse files
authored
Add automated deployment of website to gh-pages (#4)
1 parent 65f2536 commit 3584e74

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/deploy_website.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy website
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: pages
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
pages: write # to deploy to Pages
18+
id-token: write # to verify the deployment originates from an appropriate source
19+
20+
# Deploy to the github-pages environment
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Install Hugo CLI
30+
env:
31+
HUGO_VERSION:
32+
run: |
33+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.131.0/hugo_extended_0.131.0_linux-amd64.deb \
34+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
35+
36+
- name: Build with Hugo
37+
run: |
38+
hugo --gc
39+
40+
- name: Deploy pages
41+
uses: actions/deploy-pages@v4
42+
with:
43+
folder: ./public
44+
repository-name: scientific-python-translations/scientific-python-translations.github.com
45+
branch: main
46+
token: ${{ secrets.PERSONAL_TOKEN }}

0 commit comments

Comments
 (0)