Merge pull request #41 from todays-mitsui/solid-start #58
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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test_tuber: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cargo Build | |
run: cargo build --verbose --manifest-path ./tuber/Cargo.toml | |
- name: Cargo Test | |
run: cargo test --verbose --manifest-path ./tuber/Cargo.toml | |
test_ski: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cargo Build | |
run: cargo build --verbose --manifest-path ./ski/Cargo.toml | |
- name: Cargo Test | |
run: cargo test --verbose --manifest-path ./ski/Cargo.toml | |
check_doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Run astro check | |
run: | | |
cd ./doc | |
npm ci | |
npm run astro check | |
build: | |
needs: | |
- test_tuber | |
- test_ski | |
- check_doc | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Build app | |
# ./dist にビルドされたファイル一式が配置される | |
run: | | |
npm ci | |
npm run build | |
- name: Build doc | |
# ./dist/doc にビルドされたファイル一式が配置される | |
run: | | |
cd ./doc | |
npm ci | |
npm run astro build | |
- name: Fix Permissions | |
run: | | |
chmod -c -R +rX "dist/" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload dist | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./dist | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |