-
Notifications
You must be signed in to change notification settings - Fork 294
41 lines (34 loc) · 1.17 KB
/
build.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
name: Build
on:
push:
branches:
- site
workflow_dispatch:
jobs:
tests:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
secrets: inherit
with:
runner: linux.12xlarge
repository: pytorch/pytorch.github.io
docker-image: cimg/ruby:2.7-node
secrets-env: PYTORCHBOT_TOKEN
script: |
git config --global --add safe.directory /__w/pytorch.github.io/pytorch.github.io
set -euxo pipefail
## Bundle Install
cd
mkdir .bundle
bundle config path '~/vendor/bundle'
git clone https://github.com/pytorch/pytorch.github.io.git
cd pytorch.github.io
bundle install
## Yarn Install
yarn install --cache-folder ~/.cache/yarn
## Notedown Install
sudo apt update && sudo apt install python3-pip && sudo -H pip3 install pyrsistent==0.16 notedown pyyaml -Iv nbformat==5.7
## Configure Bot
git config --global user.email "[email protected]"
git config --global user.name "Website Deployment Script"
## Build Jekyll site and push to master
./scripts/deploy-site.sh build