update personal information, add open source contribs #45
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/[email protected] | |
with: | |
cmd: install | |
# clean up | |
- name: Yarn clean | |
uses: borales/[email protected] | |
with: | |
cmd: clean | |
# Build and Deploy | |
- name: Yarn build | |
uses: borales/[email protected] | |
env: | |
NODE_ENV: production | |
with: | |
cmd: build | |
- name: Write CNAME file | |
run: | | |
echo $DEPLOY_DOMAIN > dist/CNAME | |
- name: Deploy pages | |
uses: JamesIves/[email protected] | |
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/[email protected] | |
with: | |
cmd: install | |
# clean up | |
- name: Yarn clean | |
uses: borales/[email protected] | |
with: | |
cmd: clean | |
# Build and Deploy | |
- name: Yarn build | |
uses: borales/[email protected] | |
env: | |
NODE_ENV: production | |
with: | |
cmd: build | |
- name: Write CNAME file | |
run: | | |
echo $DEPLOY_DOMAIN > dist/CNAME | |
- name: Deploy pages | |
uses: JamesIves/[email protected] | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
repository-name: ${{ env.DEPLOY_REPOSITORY }} | |
branch: master | |
folder: dist |