forked from patternfly/patternfly-org
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (63 loc) · 2.26 KB
/
release.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
53
54
55
56
57
58
59
60
61
62
63
### WARNING -- this file was generated by generate-workflows
name: release
on:
push:
branches:
- v6
jobs:
build-deploy:
if: "!contains(github.event.head_commit.message, 'ci skip')"
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_REDALLEN }} # needs to be an admin token to get around branch protection
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
steps:
- run: printenv
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN_REDALLEN }} # needs to be an admin token to get around branch protection
# Injected by generate-workflows.js
- uses: actions/setup-node@v1
with:
node-version: "16"
- uses: actions/cache@v2
id: yarn-cache
name: Load npm deps from cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-yarn-14-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
# v6 build
- uses: actions/cache@v2
id: site-cache
name: Load webpack cache
with:
path: "packages/documentation-site/.cache"
key: ${{ runner.os }}-site-${{ hashFiles('yarn.lock') }}
- run: yarn build
name: Build docs
- run: .github/release.sh
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY}}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- run: node scripts/writeVersionRedirects.js
- run: node scripts/writeVersionPrefix.js
- run: du -sh build/patternfly-org/*
name: Check size of docs
- run: .github/upload-staging.sh
name: Upload docs to staging
- run: yarn build:extensions
name: Build extension docs
- name: Upload extension only docs
uses: dswistowski/surge-sh-action@v1
with:
domain: 'v6-extensions-staging.patternfly.org'
project: 'build/patternfly-org/site'
login: ${{ secrets.SURGE_LOGIN }}
token: ${{ secrets.SURGE_TOKEN }}