Skip to content

Update index.md

Update index.md #23

name: Build and Deploy
# Controls when the action will run.
on:
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout source codes
uses: actions/checkout@v2
- name: Checkout deploy branch
uses: actions/checkout@v2
with:
ref: deploy
path: public
- name: Setup node environment
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build
run: |
npm install
sudo timedatectl set-timezone Asia/Seoul
npm run generate
- name: Commit build artifacts
run: |
cd public
git config user.name ${GITHUB_ACTOR}
git config user.email ${GITHUB_ACTOR}@users.noreply.github.com
git add .
git commit -m "Update homepage"
- name: Push and deploy
run: |
cd public
repo="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
git push ${repo}