Skip to content

feat: ecfinal

feat: ecfinal #318

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
env:
python_version: "3.10"
deploy_script_version: "v0.0.4"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python runtime
uses: actions/setup-python@v5
with:
python-version: "${{ env.python_version }}"
- name: Gen Index
run: |
cd origin-data/gen-index
pip install -r requirements.txt
bash gen_index.sh
cd ../../
mkdir site
ls data/index
mv data site/
- name: Deploy to deploy-pages
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site
publish_branch: gh-pages
force_orphan: true
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: 🚀 Deploying to gh-pages @ ${{ github.sha }}
- name: Deploy
if: ${{ github.event_name != 'pull_request' }}
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
bash <(curl -s -L https://gh-proxy.com/https://raw.githubusercontent.com/Dup4/bash-script-snippet/${{ env.deploy_script_version }}/deploy_gh_pages.sh) \
-r xcpcio/board-data \
-d /var/docker-data/nginx/www/xcpcio \
-b gh-pages \
-p gh-proxy.com/https://github.com \
- name: Deploy I18n
if: ${{ github.event_name != 'pull_request' }}
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST_I18N }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
username: root
port: 22
script: |
bash <(curl -s -L https://raw.github.com/Dup4/bash-script-snippet/${{ env.deploy_script_version }}/deploy_gh_pages.sh) \
-r xcpcio/board-data \
-d /var/docker-data/nginx/www/xcpcio \
-b gh-pages \
-p github.com