forked from primer/view_components
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.9 KB
/
Copy pathstatic-files.yml
File metadata and controls
53 lines (50 loc) · 1.9 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
name: Generate static files
on:
workflow_dispatch:
push:
branches-ignore:
- 'dependabot/**'
permissions: {}
jobs:
static:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
id: app-token
with:
app-id: ${{ vars.PRIMER_APP_ID_SHARED }}
private-key: ${{ secrets.PRIMER_APP_PRIVATE_KEY_SHARED }}
owner: opf
repositories: primer_view_components
permission-contents: write
# persist-credentials must stay on: git-auto-commit-action below pushes
# via the credentials actions/checkout writes to git config. The token is
# a scoped app-token (contents:write, this repo only), not GITHUB_TOKEN.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 # zizmor: ignore[artipacked]
with:
token: ${{ steps.app-token.outputs.token }}
persist-credentials: true
- uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde # v1
with:
ruby-version: '3.4'
bundler-cache: true
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 24
cache: 'npm'
- name: Build
run: npm ci
- name: Generate static files
run: |
bundle exec rake utilities:build
bundle exec rake docs:build
bundle exec rake static:dump
- uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
with:
commit_message: Generating static files
commit_user_name: OpenProject CI
commit_user_email: openprojectci@users.noreply.github.com
commit_author: OpenProject CI <openprojectci@users.noreply.github.com>
file_pattern: lib/primer/classify/utilities.yml static/*.json