Last active
August 17, 2020 15:28
-
-
Save simbafs/44643961d9b9a8e8604dd2fa580fd165 to your computer and use it in GitHub Desktop.
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: Hexo | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v1 | |
with: | |
node_version: ${{ matrix.node_version }} | |
- name: Configuration environment | |
env: | |
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | |
GPG_KEY: ${{ secrets.GPG_KEY }} | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$DEPLOY_KEY" | tr -d '\r' > ~/.ssh/id_rsa | |
echo "$DEPLOY_KEY" | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
git config --global user.name "simba-fs" | |
git config --global user.email "simba.fs@gmail.com" | |
echo "$GPG_KEY" > private.key | |
gpg --import private.key | |
# git config --global gpg.program gpg2 | |
git config --global user.signingkey DD17CEF74242942DC4B09E3E22D857A2BFB0E0AC | |
git config --global commit.gpgsign true | |
git config --list --show-origin | |
- name: Update themes | |
run: | | |
git submodule init | |
git submodule update | |
- name: Install dependencies | |
run: | | |
npm i -g hexo-cli | |
npm i | |
- name: Clean file | |
run: | | |
hexo clean | |
- name: Generate hexo | |
run: | | |
hexo generate | |
- name: Deploy hexo | |
run: | | |
hexo deploy |
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: Hexo | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v1 | |
with: | |
node_version: ${{ matrix.node_version }} | |
- name: Configuration environment | |
env: | |
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | |
username: simba-fs | |
email: simba.fs@gmail.com | |
# GPG_KEY: ${{ secrets.GPG_KEY }} | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$DEPLOY_KEY" | tr -d '\r' > ~/.ssh/id_rsa | |
echo "$DEPLOY_KEY" | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
git config --global user.name "$username" | |
git config --global user.email "$email" | |
git config --global commit.gpgsign true | |
- name: Imoport GPG key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v2 | |
with: | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
env: | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
PASSPHRASE: ${{ secrets.PASSPHRASE }} | |
- name: Update themes | |
run: | | |
git submodule init | |
git submodule update | |
- name: Install dependencies | |
run: | | |
npm i -g hexo-cli | |
npm i | |
- name: Clean file | |
run: | | |
hexo clean | |
- name: Generate hexo | |
run: | | |
hexo generate | |
- name: Deploy hexo | |
run: | | |
hexo deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment