Skip to content

Commit

Permalink
implemented new github action format
Browse files Browse the repository at this point in the history
  • Loading branch information
runemadsen committed Jan 26, 2023
1 parent 2e80b64 commit 8746e72
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
name: Deploy Production

on:
release:
types: [released]

workflow_dispatch:
inputs:
version:
description: 'The version of the website used for the GitHub release'
type: string
required: true
description:
description: 'The description of changes used in the GitHub release changelog'
type: string
required: true
make_release:
description: 'Make a GitHub release with a referenze.zip after uploading the website'
type: boolean
required: true
default: true
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,3 +33,13 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make reference.zip
run: npm run zip
- name: Create release
uses: softprops/action-gh-release@v1
if: ${{ inputs.make_release }}
with:
files: reference.zip
body: ${{ inputs.description }}
name: 'Website ${{ inputs.version }}'
tag_name: ${{ inputs.version }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"updateKeywords": "node scripts/updateKeywords.js",
"deploy": "static deploy",
"deployGithub": "gatsby clean && static deploy --env production --confirm",
"open": "static open"
"open": "static open",
"zip": "cd public; zip -r ../reference.zip *"
},
"dependencies": {
"@mdx-js/mdx": "1.6.22",
Expand Down

0 comments on commit 8746e72

Please sign in to comment.