forked from mozilla/pdf.js
-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (51 loc) · 1.66 KB
/
Copy pathdist.yml
File metadata and controls
60 lines (51 loc) · 1.66 KB
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
53
54
55
56
57
58
59
60
name: Build Dist
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build-dist:
name: Build Dist
runs-on: ubuntu-latest
steps:
- name: Configure Git
run: |
git config --global core.autocrlf false
git config --global user.name "CoParse GitHub Bot"
git config --global user.email "github-bot@coworker.com"
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js 14 LTS
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install Gulp
run: npm install -g gulp-cli
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm install
- name: Build dist
run: |
gulp dist-pre
rm -rf build/dist
mkdir -p build/dist
git clone --depth 2 --single-branch --branch=dist https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/coparse-inc/pdf.js.git build/dist/
- name: Deploy dist
run: |
gulp dist
cd build/dist
git remote set-url origin https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/coparse-inc/pdf.js.git
git push --tags origin dist