File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change 1
- name : Build website
1
+ name : Build and deploy website
2
2
on :
3
3
push :
4
4
branches :
5
5
- main
6
6
pull_request :
7
7
branches :
8
8
- main
9
+ workflow_dispatch :
10
+
9
11
jobs :
10
- Build-website :
12
+ build :
11
13
runs-on : ubuntu-latest
12
14
steps :
13
15
- uses : actions/checkout@v4
@@ -51,10 +53,20 @@ jobs:
51
53
uses : actions/upload-pages-artifact@v3
52
54
with :
53
55
path : _site
56
+
57
+ deploy :
58
+ if : >
59
+ github.ref == 'refs/heads/main'
60
+ && github.repository == 'UCL/rsd-engineeringcourse'
61
+ needs : build
62
+ permissions :
63
+ pages : write
64
+ id-token : write
65
+ environment :
66
+ name : github-pages
67
+ url : ${{ steps.deployment.outputs.page_url }}
68
+ runs-on : ubuntu-latest
69
+ steps :
54
70
- name : Deploy to GitHub Pages
55
- if : >
56
- success()
57
- && github.ref == 'refs/heads/main'
58
- && github.repository == 'UCL/rsd-engineeringcourse'
59
71
id : deployment
60
72
uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments