artifactview/.forgejo/workflows/artifact.yaml

43 lines
1.2 KiB
YAML

name: Test artifact
on:
push:
branches:
- main
paths:
- ".forgejo/workflows/artifact.yaml"
jobs:
artifact:
runs-on: cimaster-latest
steps:
- name: 👁️ Checkout repository
uses: actions/checkout@v4
- name: Create test artifacts
run: |
# A1
mkdir -p artifacts/a1/mdbook
cd artifacts
git clone https://github.com/rust-lang/mdBook
cd mdBook/test_book
mdbook build -d ../../a1/mdbook
cd ../..
cp -r ../tests/testfiles/junit ../tests/testfiles/sites/style.css ../tests/testfiles/sites/404.html ../tests/testfiles/sites/example.rs ../README.md a1
# A2
git clone https://github.com/SveltePress/sveltepress
cd sveltepress/packages/docs-site
pnpm i
pnpm build
mv dist ../../../a2
- name: Upload A1 (Example)
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: Example
path: artifacts/a1
- name: Upload A2 (SveltePress)
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: SveltePress
path: artifacts/a2