Reusable Workflows.
Coming soon...
| Workflow File | Uses Line |
|---|---|
| npm-build.yaml | cssnr/workflows/.github/workflows/npm-build.yaml |
| deploy-static.yaml | cssnr/workflows/.github/workflows/deploy-static.yaml |
Example using both workflows: django-files/django-files.github.io/dev.yaml
jobs:
build:
name: "Build"
if: ${{ !contains(github.event.head_commit.message, '#nodev') }}
uses: cssnr/workflows/.github/workflows/npm-build.yaml@master
permissions:
contents: read
with:
install: "npm ci" # install command
build: "npm run build" # build command
path: "dist" # directory of artifacts
name: "artifact" # artifact name
pages: false # create a pages artifact
secrets:
webhook: ${{ secrets.webhook }} # failure notification
# Example Usage
deploy:
name: "Deploy"
needs: build
runs-on: ubuntu
steps:
- name: "Download Artifact"
uses: actions/download-artifact@v5
with:
name: "artifact"
- name: "Debug"
run: ls -lAh .jobs:
build:
# Example Usage
- name: "Upload Artifact"
uses: actions/upload-artifact@v4
with:
path: dist
name: "artifact"
deploy:
name: "Deploy"
uses: cssnr/workflows/github/workflows/deploy-static.yaml
needs: build
permissions:
contents: read
with:
name: "dev" # Environment name and url
url: "https://dev-static.cssnr.com/github-projects"
path: "github-projects" # Optional path/subdirectory
robots: true # Add robots.txt to block robots
artifact: "artifact" # Custom artifact name
dest: "/static" # Target rsync destination
secrets:
host: ${{ secrets.DEV_DEPLOY_HOST }}
port: ${{ secrets.DEV_DEPLOY_PORT }}
user: ${{ secrets.DEV_DEPLOY_USER }}
pass: ${{ secrets.DEV_DEPLOY_PASS }}
webhook: ${{ secrets.DISCORD_WEBHOOK }} # Optional discord notificationFor instructions on modifying the documentation see the CONTRIBUTING.md.
Please consider making a donation to support the development of this project and additional open source projects.
For a full list of current projects visit: https://cssnr.github.io/