Skip to content

build_application

build_application #217

Workflow file for this run

name: Build and Deploy
on: [push, repository_dispatch]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout self
uses: actions/checkout@master
- name: Checkout blog
uses: actions/checkout@v2
with:
repository: ${{ secrets.REPO_BLOG }}
token: ${{ secrets.REPO_BLOG_ACCESS_TOKEN }}
path: blog
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Move blog/public/ to blog/.vuepress/
run: mv -f blog/public/ blog/.vuepress/public/
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: vuepress-deploy
uses: jenkey2011/vuepress-deploy@master
env:
ACCESS_TOKEN: ${{ secrets.REPO_HOSTING_ACCESS_TOKEN }}
TARGET_REPO: ${{ secrets.REPO_HOSTING }}
TARGET_BRANCH: main
BUILD_SCRIPT: yarn && yarn build
BUILD_DIR: blog/.vuepress/dist/
CNAME: ${{ secrets.CNAME }}