1 Commits

Author SHA1 Message Date
Morten Olsen
89c0271fc5 ci: use pages artifact 2023-09-06 13:44:54 +02:00
2 changed files with 7 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ jobs:
pnpm install pnpm install
pnpm run build pnpm run build
env: env:
ASSET_URL: https://mortenolsen.pro/bob ASSET_URL: https://mortenolsen.pro/bob/
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: lib name: lib
@@ -44,12 +44,10 @@ jobs:
packages/*/package.json packages/*/package.json
package.json package.json
README.md README.md
- uses: actions/upload-artifact@v3 - name: Upload artifact
uses: actions/upload-pages-artifact@v2
with: with:
name: web path: './packages/playground/dist'
retention-days: 5
path: |
packages/playground/dist
update-release-draft: update-release-draft:
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
needs: build needs: build
@@ -76,11 +74,11 @@ jobs:
name: github-pages name: github-pages
url: ${{ steps.deployment.outputs.page_url }} url: ${{ steps.deployment.outputs.page_url }}
steps: steps:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v2 uses: actions/deploy-pages@v2
with:
artifact_name: web
release-npm: release-npm:
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'

View File

@@ -6,6 +6,6 @@ const ASSET_URL = process.env.ASSET_URL || '';
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
base: `${ASSET_URL}/dist/`, base: ASSET_URL,
plugins: [mdx(), react()], plugins: [mdx(), react()],
}); });