forked from iotaledger/iota-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (66 loc) · 2.01 KB
/
deploy.yml
File metadata and controls
68 lines (66 loc) · 2.01 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
name: deploy
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
deploy:
runs-on: ubuntu-latest
env:
CONTENT: '*/*/*/documentation,*/*/*,*/*'
NODE_OPTIONS: '--max-old-space-size=3072'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Needed for showLastUpdateTime to work
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Allow modern Yarn
run: |
corepack enable
- name: Init and update submodules
run: |
git submodule update --init --recursive --remote
- name: Install dependencies
id: install
run: |
yarn install
- name: Build
run: |
yarn build:all
- name: Release to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
user_name: 'github-action[bot]'
user_email: 'github-action[bot]@noreply@github.com'
cname: wiki.iota.org
- name: Update dependencies
id: update
if: always() && (steps.install.outcome == 'failure')
run: |
yarn install --no-immutable
- name: Create PR to update dependencies
id: pr
if: always() && (steps.update.outcome == 'success')
uses: peter-evans/create-pull-request@v3
with:
author: GitHub <noreply@github.com>
token: ${{ secrets.GITHUB_TOKEN }}
branch: 'bot/update-dependencies'
delete-branch: true
add-paths: |
yarn.lock
commit-message: Update dependencies
title: '[BOT] Update dependencies'
reviewers: 'Dr-Electron, jlvandenhout'
body: >
This PR is auto-generated by
[create-pull-request](https://github.com/peter-evans/create-pull-request).
- name: Fail job
if: always() && (steps.pr.outcome == 'success')
run: |
exit 1