-
Notifications
You must be signed in to change notification settings - Fork 6
52 lines (48 loc) · 1.6 KB
/
deploy-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Deployment
on:
release:
types:
- created
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install dependencies
run: |
npm install --silent
npm run build:production
- name: Create deployment ZIP
run: |
mkdir -p dewp-planet-feed
rsync -rav --exclude-from='.rsync-exclude' --delete-excluded ./ dewp-planet-feed
zip -r dewp-planet-feed.zip dewp-planet-feed/
cd dewp-planet-feed/assets
zip -r ../../assets.zip ./*
cd ../..
rm -rf dewp-planet-feed
- name: Get Release
id: get_release
uses: bruceadams/[email protected]
- name: Upload ZIP to release.
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./dewp-planet-feed.zip
asset_name: dewp-planet-feed.zip
asset_content_type: application/zip
- name: Upload assets ZIP to release.
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./assets.zip
asset_name: assets.zip
asset_content_type: application/zip