Change in .gitignore #7
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 posts | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: A job to deploy blog. | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Install hexo globally | |
run: npm install -g hexo | |
- name: Generate blog | |
run: hexo generate | |
- name: Deploy | |
uses: nogsantos/scp-deploy@master | |
with: | |
src: ./public/* | |
host: ${{ secrets.SSH_HOST }} | |
remote: ${{ secrets.SSH_DIR }} | |
port: ${{ secrets.SSH_PORT }} | |
user: ${{ secrets.SSH_USER }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
# Caching dependencies to speed up workflows. (GitHub will remove any cache entries that have not been accessed in over 7 days.) | |
# - name: Cache node modules | |
# uses: actions/cache@v1 | |
# id: cache | |
# with: | |
# path: node_modules | |
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
# restore-keys: | | |
# ${{ runner.os }}-node- | |
# Use the output from the `deploy` step(use for test action) | |
- name: Get the output | |
run: | | |
echo "${{ steps.deploy.outputs.notify }}" |