Skip to content

Commit

Permalink
Merge pull request #65 from uktrade/ci/rename-and-tidy-workflows
Browse files Browse the repository at this point in the history
ci: rename workflows and publish docs directly to pages rather than via branch
  • Loading branch information
michalc committed Aug 5, 2023
2 parents 71f354c + 773c609 commit b665f64
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 25 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy-docs-to-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy docs to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11
- run: pip install -r requirements-docs.txt
- run: mkdocs build --site-dir _site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Publish to PyPI
name: Deploy package to PyPI

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -24,9 +26,11 @@ jobs:
with:
path: ./dist

pypi-publish:
needs: ["build"]
environment: "publish-pypi"
deploy:
needs: [build]
environment:
name: pypi
url: https://pypi.org/project/stream-unzip/

name: upload release to PyPI
runs-on: ubuntu-latest
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/docs.yml

This file was deleted.

0 comments on commit b665f64

Please sign in to comment.