Merge pull request #413 from zexi/automated-cherry-pick-of-#411-upstr… #193
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: Release website to github pages and buckets | |
on: | |
push: | |
branches: | |
# - release/* # Set a branch to deploy | |
- release/3.11 # Set a branch to deploy | |
# - main # Set a branch to deploy | |
# tags: | |
# - v3.* | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: yarn | |
- name: "Install dependencies" | |
shell: bash | |
run: | | |
yarn install --frozen-lockfile | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11.3' | |
- name: Build public site | |
run: | | |
./scripts/build.py --host=https://www.cloudpods.org --edition=ce --multi-versions --no-out-fetch | |
ls -alh ./public | |
- name: Publish site to yunionio/yunionio.github.io | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.PERSONAL_TOKEN }} | |
publish_dir: ./public | |
external_repository: yunionio/yunionio.github.io | |
allow_empty_commit: true | |
cname: www.cloudpods.org | |
publish_branch: master | |
- name: Publish site to AWS s3 | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# deploy config | |
AWS_REGION: 'ap-east-1' | |
SOURCE_DIR: 'public' |