GitHub Workflow Directory
In case you're going ahead with a github workflow method for your Layer0 deployments, do make sure that a environment secret of
layer0_deploy_token
is added to your GitHub repository. Here's how you can add it .The Layer0 traditional template comes with a .github
workflow directory, in which there's layer0.yml
configuration file.
| .github/
--| workflows/
----| layer0.yml
.github/workflows/layer0.yml
name: Deploy to Layer0
on:
workflow_dispatch:
push:
jobs:
deploy-to-layer0:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://npm-proxy.fury.io/moovweb/
- run: npm i
- run: npm run 0:deploy -- --token=$LAYER0_DEPLOY_TOKEN
env:
LAYER0_DEPLOY_TOKEN: ${{ secrets.LAYER0_DEPLOY_TOKEN }}
In all the yml file, when pushed on a git repository does the following:
- Spins up an Ubuntu instance
- Installs Node.js Version 14
-
Executes
npm install
to install depedencies from package.json -
Execute
npm run 0:deploy
to build and deploy your app on Layer0.
Edit this page on GitHub
Updated at Tue, Jun 21, 2022