mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 22:40:29 +03:00
Fixed pull request preview deploys (#166)
* Update and rename pull-request.yml to build-pull-request.yml * Create deploy-pull-request.yml
This commit is contained in:
parent
1137c11c59
commit
a4b27fdeab
3 changed files with 110 additions and 30 deletions
32
.github/workflows/build-pull-request.yml
vendored
Normal file
32
.github/workflows/build-pull-request.yml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: 'Build PR'
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: ['opened', 'synchronize']
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PR_NUMBER: ${{github.event.number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: npm install && npm run build
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: previewbuild
|
||||
path: dist
|
||||
retention-days: 1
|
||||
- uses: actions/github-script@v3.1.0
|
||||
with:
|
||||
script: |
|
||||
var fs = require('fs');
|
||||
fs.writeFileSync('${{github.workspace}}/pr.json', JSON.stringify(context.payload.pull_request));
|
||||
- name: Upload PR Info
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: pr.json
|
||||
path: pr.json
|
||||
retention-days: 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue