https://github.com/cssnr/workflows
Reusable Workflows
https://github.com/cssnr/workflows
Last synced: 4 months ago
JSON representation
Reusable Workflows
- Host: GitHub
- URL: https://github.com/cssnr/workflows
- Owner: cssnr
- Created: 2025-01-22T22:04:19.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-11-10T04:59:33.000Z (7 months ago)
- Last Synced: 2025-11-10T05:33:05.520Z (7 months ago)
- Homepage: https://actions.cssnr.com
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
[](https://github.com/cssnr/workflows/actions/workflows/.lint.yaml)
[](https://github.com/cssnr/workflows/pulse)
[](https://github.com/cssnr/workflows/graphs/contributors)
[](https://github.com/cssnr/workflows)
[](https://github.com/cssnr/workflows/discussions)
[](https://github.com/cssnr/workflows/stargazers)
[](https://cssnr.github.io/)
[](https://discord.gg/wXy6m2X8wY)
[](https://ko-fi.com/cssnr)
# Workflows
~~Reusable~~ Workflows.
- https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows
Coming soon...
| Workflow File | Uses Line |
| :--------------------------------------------------------- | :----------------------------------------------------- |
| [npm-build.yaml](.github/workflows/npm-build.yaml) | `cssnr/workflows/.github/workflows/npm-build.yaml` |
| [deploy-static.yaml](.github/workflows/deploy-static.yaml) | `cssnr/workflows/.github/workflows/deploy-static.yaml` |
Example using both workflows: [django-files/django-files.github.io/dev.yaml](https://github.com/django-files/django-files.github.io/blob/master/.github/workflows/dev.yaml)
### npm-build.yaml
```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 .
```
### deploy-static.yaml
```yaml
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 notification
```
# Contributing
For instructions on modifying the documentation see the [CONTRIBUTING.md](#contributing-ov-file).
Please consider making a donation to support the development of this project
and [additional](https://cssnr.com/) open source projects.
[](https://ko-fi.com/cssnr)
For a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)