Skip to content
64 linesCodeBlameRaw
1name: Deploy to g1t.page
2description: Builds this checkout and puts it on g1t.page. Production from the project's production branch, a preview from a pull request or any other branch.
3author: g1t
4
5inputs:
6 project:
7 description: The project's slug. Leave it out when the repository has one project with Deployments on.
8 required: false
9 default: ""
10 root-dir:
11 description: Where the project is in the checkout. The project's own setting unless you say.
12 required: false
13 default: ""
14 build-command:
15 description: What builds it. The project's own setting, else what the build finds (a Workers config, the package's build script, or the framework's own command).
16 required: false
17 default: ""
18 output-dir:
19 description: The folder a static build writes. The project's own setting, else the folder the framework writes, else the first of dist, build, out, public, _site or .output/public.
20 required: false
21 default: ""
22 build-as:
23 description: What it is built as, auto, static, workers or docker. The project's own setting unless you say; auto finds it from the project's files.
24 required: false
25 default: ""
26 dockerfile:
27 description: The Dockerfile a container is built from, relative to the project. The project's setting, else Dockerfile or Containerfile.
28 required: false
29 default: ""
30 sha:
31 description: The commit this is a build of, for the commit's g1t / deploy check. The run's commit unless you say.
32 required: false
33 default: ""
34 token:
35 description: The job's own token, which needs permissions deployments write. Another token is refused.
36 required: false
37 default: ${{ github.token }}
38
39outputs:
40 url:
41 description: Where the app is served, on g1t.page.
42 value: ${{ steps.deploy.outputs.url }}
43 deployment-id:
44 description: The build's id, dpl_….
45 value: ${{ steps.deploy.outputs.deployment-id }}
46 kind:
47 description: production or preview.
48 value: ${{ steps.deploy.outputs.kind }}
49
50runs:
51 using: composite
52 steps:
53 - id: deploy
54 shell: bash
55 env:
56 INPUT_PROJECT: ${{ inputs.project }}
57 INPUT_ROOT_DIR: ${{ inputs.root-dir }}
58 INPUT_BUILD_COMMAND: ${{ inputs.build-command }}
59 INPUT_OUTPUT_DIR: ${{ inputs.output-dir }}
60 INPUT_BUILD_AS: ${{ inputs.build-as }}
61 INPUT_DOCKERFILE: ${{ inputs.dockerfile }}
62 INPUT_SHA: ${{ inputs.sha }}
63 INPUT_TOKEN: ${{ inputs.token }}
64 run: bash "$GITHUB_ACTION_PATH/deploy.sh"