Skip to content

Commit

Permalink
Deploy to GitHub Pages via Action
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Jan 27, 2024
1 parent 3c7b3d3 commit d2892c1
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install dependencies
run: pip install -r requirements.txt

Expand All @@ -21,11 +21,24 @@ jobs:
env:
TERM: xterm-256color

- name: Deploy
run: |
git config --global user.name 'Myelin Bot'
git config --global user.email '[email protected]'
python ./scripts/deploy.py
if: github.ref == 'refs/heads/master' && github.repository == 'myelin-ai/website'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
path: public

deploy:
needs: build
if: github.ref_name == 'main'

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@v4

0 comments on commit d2892c1

Please sign in to comment.