Skip to content

Commit 8746e72

Browse files
committed
implemented new github action format
1 parent 2e80b64 commit 8746e72

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
name: Deploy Production
22

33
on:
4-
release:
5-
types: [released]
6-
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'The version of the website used for the GitHub release'
8+
type: string
9+
required: true
10+
description:
11+
description: 'The description of changes used in the GitHub release changelog'
12+
type: string
13+
required: true
14+
make_release:
15+
description: 'Make a GitHub release with a referenze.zip after uploading the website'
16+
type: boolean
17+
required: true
18+
default: true
719
jobs:
820
build:
921
runs-on: ubuntu-latest
@@ -21,3 +33,13 @@ jobs:
2133
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
2234
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2335
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
- name: Make reference.zip
37+
run: npm run zip
38+
- name: Create release
39+
uses: softprops/action-gh-release@v1
40+
if: ${{ inputs.make_release }}
41+
with:
42+
files: reference.zip
43+
body: ${{ inputs.description }}
44+
name: 'Website ${{ inputs.version }}'
45+
tag_name: ${{ inputs.version }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"updateKeywords": "node scripts/updateKeywords.js",
3030
"deploy": "static deploy",
3131
"deployGithub": "gatsby clean && static deploy --env production --confirm",
32-
"open": "static open"
32+
"open": "static open",
33+
"zip": "cd public; zip -r ../reference.zip *"
3334
},
3435
"dependencies": {
3536
"@mdx-js/mdx": "1.6.22",

0 commit comments

Comments
 (0)