Rename main.yml to save-assets.yml #1
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: Save Images and Videos to manual-assets repo | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare environments | |
run: | | |
mkdir build | |
mkdir -p build/assets/Images | |
mkdir -p build/assets/Videos | |
- name: Copy images and videos | |
run: | | |
cp assets/Images build/assets/Images | |
cp assets/Videos build/assets/Videos | |
- name: Get index.html | |
run: | | |
cd build | |
wget https://raw.githubusercontent.com/GamemakerChina/manual-assets/buildfiles/assets-index.html -O index.html | |
- name: Deploy to assets branch | |
uses: JamesIves/github-pages-deploy-action@releases/v4 | |
with: | |
repository-name: GamemakerChina/manual-assets | |
token: ${{ secrets.ACCESS_TOKEN }} | |
branch: main | |
folder: build |