Skip to content

Commit

Permalink
Fix: break out ci and gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
lwasser committed Jul 14, 2024
1 parent b850bd6 commit baf709a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# This file was created automatically with `myst init --gh-pages` 🪄 💚

name: MyST GitHub Pages Deploy
on:
schedule:
- cron: '0 0 * * 0' # Run every Sunday @ midnight (UTC)
pull_request:
push:
# Runs on pushes targeting the default branch
branches: [main]
branches:
- main
env:
# `BASE_URL` determines the website is served from, including CSS & JS assets
# You may need to change this to `BASE_URL: ''`
Expand All @@ -23,10 +22,7 @@ concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -42,13 +38,26 @@ jobs:
pip list
- name: Build HTML Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: myst build --html --execute
shell: bash
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './_build/html'
# Only deploy on pyopensci owned repo / when pushed to main branch
deploy:
needs: build
if: github.ref == 'refs/heads/main' && github.repository_owner == 'pyOpenSci'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-pages-artifact@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ __pycache__/


_build/*
.ipynb_checkpoints/*
.ipynb_checkpoints/*
*.pickle
package-lock.json
package.json
.vscode/
node_modules/*

0 comments on commit baf709a

Please sign in to comment.