Merge pull request #13 from moesoha/dependabot/npm_and_yarn/y18n-3.2.2 #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish two versions | |
on: | |
push: | |
branches: | |
- source | |
jobs: | |
deploy-zh: | |
env: | |
COMPILE_LANG: zh | |
GOOGLE_ANALYTICS_ID: G-VKZ6EZDQWY | |
DEPLOY_DOMAIN: jin.sh | |
DEPLOY_REPOSITORY: moesoha/moesoha.github.io | |
runs-on: ubuntu-latest | |
steps: | |
# Preparing | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Yarn install | |
uses: borales/actions-yarn@v3.0.0 | |
with: | |
cmd: install | |
# clean up | |
- name: Yarn clean | |
uses: borales/actions-yarn@v3.0.0 | |
with: | |
cmd: clean | |
# Build and Deploy | |
- name: Yarn build | |
uses: borales/actions-yarn@v3.0.0 | |
env: | |
NODE_ENV: production | |
with: | |
cmd: build | |
- name: Write CNAME file | |
run: | | |
echo $DEPLOY_DOMAIN > dist/CNAME | |
- name: Deploy pages | |
uses: JamesIves/github-pages-deploy-action@4.1.1 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
repository-name: ${{ env.DEPLOY_REPOSITORY }} | |
branch: master | |
folder: dist | |
deploy-en: | |
env: | |
COMPILE_LANG: en | |
GOOGLE_ANALYTICS_ID: G-5GNRCDHKBS | |
DEPLOY_DOMAIN: sohaj.in | |
DEPLOY_REPOSITORY: moesoha/sohaj.in | |
# JUST SIMPLE COPY & PASTE BELOW SINCE GITHUB DID NOT SUPPORT ANCHORS | |
runs-on: ubuntu-latest | |
steps: | |
# Preparing | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Yarn install | |
uses: borales/actions-yarn@v3.0.0 | |
with: | |
cmd: install | |
# clean up | |
- name: Yarn clean | |
uses: borales/actions-yarn@v3.0.0 | |
with: | |
cmd: clean | |
# Build and Deploy | |
- name: Yarn build | |
uses: borales/actions-yarn@v3.0.0 | |
env: | |
NODE_ENV: production | |
with: | |
cmd: build | |
- name: Write CNAME file | |
run: | | |
echo $DEPLOY_DOMAIN > dist/CNAME | |
- name: Deploy pages | |
uses: JamesIves/github-pages-deploy-action@4.1.1 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
repository-name: ${{ env.DEPLOY_REPOSITORY }} | |
branch: master | |
folder: dist |