Skip to content

Commit 6915efe

Browse files
authored
Merge pull request #92 from jtpio/pages-action
Deploy to Pages with GitHub Actions
2 parents 321e5d5 + 761c48e commit 6915efe

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,25 @@ jobs:
2424
- name: Build the JupyterLite site
2525
run: |
2626
cp README.md content
27-
jupyter lite build --contents content
28-
- name: Upload (dist)
29-
uses: actions/upload-artifact@v2
27+
jupyter lite build --contents content --output-dir dist
28+
- name: Upload artifact
29+
uses: actions/upload-pages-artifact@v1
3030
with:
31-
name: jupyterlite-demo-dist-${{ github.run_number }}
32-
path: ./_output
31+
path: ./dist
3332

3433
deploy:
34+
needs: build
3535
if: github.ref == 'refs/heads/main'
36-
needs: [build]
36+
permissions:
37+
pages: write
38+
id-token: write
39+
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
3744
runs-on: ubuntu-latest
3845
steps:
39-
- name: Checkout
40-
uses: actions/[email protected]
41-
- uses: actions/download-artifact@v2
42-
with:
43-
name: jupyterlite-demo-dist-${{ github.run_number }}
44-
path: ./dist
45-
- name: Deploy
46-
uses: JamesIves/[email protected]
47-
with:
48-
branch: gh-pages
49-
folder: dist
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)