We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Based on recommendations from @cmdoret and @rmfranken. Feel free to add anything I missed.
docker_publish.yml
Time optimization:
Code redundancy:
env
Example:
env: REGISTRY: ghcr.io MAIN: ${{ github.ref == 'refs/heads/main' }} [...] - name: Build Docker image uses: docker/build-push-action@v5.0.0 with: context: . platforms: linux/amd64,linux/arm64 file: .docker/Dockerfile push: ${{ env.MAIN }}
sphynx_docs.yml
name: docs on: push: branches: [main] pull_request: paths: - 'docs/**' permissions: contents: write jobs: docs-build: runs-on: ubuntu-latest steps: # https://github.com/actions/checkout - uses: actions/checkout@v4 # https://github.com/actions/setup-python - uses: actions/setup-python@v4 # https://github.com/snok/install-poetry - name: Install Poetry uses: snok/install-poetry@v1 - name: Install dependencies run: | poetry install --with doc - name: Sphinx build run: | make doc - name: Archive docs artifacts uses: actions/upload-artifact@v3 with: name: sphynx_docs path: docs/** docs-push: runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' steps: # https://github.com/actions/checkout - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 with: name: sphynx_docs # https://github.com/peaceiris/actions-gh-pages - name: Deploy uses: peaceiris/actions-gh-pages@v3 # if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/docs-website' }} with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_build/ force_orphan: true
The text was updated successfully, but these errors were encountered:
These are very good ideas! I especially like the use of artifacts for docs.
For docker, we could also gain time by using GitHub action's layer caching system: https://depot.dev/blog/docker-layer-caching-in-github-actions#docker-layer-caching-in-github-actions
Sorry, something went wrong.
supermaxiste
No branches or pull requests
Based on recommendations from @cmdoret and @rmfranken. Feel free to add anything I missed.
docker_publish.yml
Time optimization:
Code redundancy:
env
variable to compute whether to push the image or not and add it as parameter in the actionExample:
sphynx_docs.yml
Code redundancy:
Example:
The text was updated successfully, but these errors were encountered: