-
Notifications
You must be signed in to change notification settings - Fork 113
40 lines (39 loc) · 1.42 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
name: Website Deployment
on:
push:
branches:
- master
jobs:
deploy-website:
name: Deploy Website
timeout-minutes: 60
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[deploy_website]') || contains(github.ref, 'refs/tags/')
steps:
- name: Checkout Master
uses: actions/checkout@v2
- name: Configure Git Credientials
run: |
git config --global user.email "${{github.actor}}@users.noreply.github.com"
git config --global user.name "${{github.actor}}"
echo "machine github.com login ${{github.actor}} 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@v2
with:
node-version: '14.x'
- name: Install Dependencies using Yarn
run: yarn install --ignore-engines --frozen-lockfile
- name: Deploy 🚀
run: yarn deploy:website
env:
GIT_USER: ${{github.actor}}
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY: a5522203ca95675199cc21edf09e6d75
NEXT_PUBLIC_ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}