forked from jakearchibald/svgomg
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (81 loc) · 2.23 KB
/
ci.yml
File metadata and controls
82 lines (81 loc) · 2.23 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on: [push, workflow_dispatch]
jobs:
build:
name: "build svgomg"
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
-
name: "checkout repo"
uses: actions/checkout@master
-
name: "setup node v16"
uses: actions/setup-node@master
with:
node-version: 16
-
name: "(env) pnpm"
run: curl -L https://pnpm.js.org/pnpm.js | node - add --global pnpm
-
name: "(env) cache"
uses: actions/cache@master
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ matrix.nodejs }}-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.nodejs }}-
-
name: "install dependencies"
run: pnpm install
-
name: "build svgomg"
run: pnpm run build
-
name: "upload artifact"
uses: actions/upload-artifact@master
if: github.repository == 'flourd/svgo'
with:
name: build
path: ./build/
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs: [build]
if: github.repository == 'flourd/svgo'
steps:
-
name: "checkout repo"
uses: actions/checkout@master
-
name: "download artifacts"
uses: actions/download-artifact@master
with:
name: build
path: ./build/
-
name: "(env) setup gpg"
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git-user-signingkey: true
git-config-global: true
git-commit-gpgsign: true
git-tag-gpgsign: true
-
if: success()
name: "🚀 deploy"
uses: crazy-max/[email protected]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
author: "Nicholas Berlette <[email protected]>"
committer: "Nicholas Berlette <[email protected]>"
commit_message: "🚀"
target_branch: gh-pages
build_dir: build
fqdn: svgo.tk
keep_history: true
dry_run: false
verbose: true
jekyll: false