Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maschmann/eleventy-build-action
https://github.com/maschmann/eleventy-build-action
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/maschmann/eleventy-build-action
- Owner: maschmann
- License: mit
- Created: 2024-12-14T09:58:12.000Z (20 days ago)
- Default Branch: main
- Last Pushed: 2024-12-14T10:16:40.000Z (20 days ago)
- Last Synced: 2024-12-14T10:27:02.000Z (20 days ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eleventy (11ty) build action for deployment
This action allows for an easy integration into your deployment workflow for eleventy.
I recomment using a ```.eleventy.js```for configuration .## using the action
There are four configuration options:
```yaml
node_version: 23 # default
working_directory: '.'
output: './_site'
quiet: false
```You can either set or leave them. Best is, to configure 11ty via its JS.
The action just runs a ```npm ci``` to install your dependencies and then runs 11ty with the provided options in your current workdir. If you're using a different folder structure, adjust accordingly.**example github action**
```yaml
# .github/workflows/build-and-deploy.yamlname: 11ty build and deploy
on:
push:
branches:
- 'main'jobs:
build_deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/main')steps:
- name: Checkout code
uses: actions/checkout@v4- name: Run eleventy build
uses: maschmann/eleventy-build-action@main
with:
node_version: 23 # default
working_directory: './my-project' # default '.'
output: './_site' # default
quiet: true # default false- name: Copy files to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_NAME }}
username: ${{ secrets.SERVER_DEPLOY_USER }}
key: ${{ secrets.SERVER_DEPLOY_KEY }}
rm: true
source: "_site/"
target: ${{ vars.DEPLOYMENT_TARGET }}
```[License MIT](LICENSE)