forked from ardatan/graphql-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.43 KB
/
website.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
name: Website Deployment
on:
push:
branches:
- master
jobs:
deploy-website:
name: Deploy Website
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout Master
uses: actions/checkout@v1
- name: Configure Git Credientials
run: |
git config --global user.email "[email protected]"
git config --global user.name "theguild-bot"
echo "machine github.com login theguild-bot password ${{secrets.GITHUB_TOKEN}}" > ~/.netrc
- name: Add origin remote and refetch master
run: |
git remote rm origin
git remote add origin "https://github.com/${{github.repository}}"
git fetch
git checkout master
git reset --hard
- name: Use Node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-14-15-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-14-15-yarn-
- name: Install Dependencies using Yarn
run: yarn install && git checkout yarn.lock
- name: Deploy 🚀
run: yarn deploy:website
env:
GIT_USER: theguild-bot