Skip to content

Commit

Permalink
initial checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
yan-kisen committed Mar 26, 2021
1 parent f8bdb22 commit 382b6e0
Show file tree
Hide file tree
Showing 7 changed files with 15,950 additions and 5,284 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'GH Action - Test Build'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'

env:
DEPLOYMENT_ENV: test
NODE_ENV: development
CTF_CDA_ACCESS_TOKEN: ${{secrets.CTF_CDA_ACCESS_TOKEN}}
CTF_CPA_ACCESS_TOKEN: ${{secrets.CTF_CPA_ACCESS_TOKEN}}
CTF_SPACE_ID: ${{ secrets.CTF_SPACE_ID }}
CTF_ENVIRONMENT_ID: master
DEBUG_LEVEL: 2 # NOTE: increase this to get more log information


jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
npm install
- run: |
npm run all
29 changes: 29 additions & 0 deletions .github/workflows/test-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'GH Action - Test Run'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'

env:
DEPLOYMENT_ENV: test
NODE_ENV: development
CTF_CDA_ACCESS_TOKEN: ${{secrets.CTF_CDA_ACCESS_TOKEN}}
CTF_CPA_ACCESS_TOKEN: ${{secrets.CTF_CPA_ACCESS_TOKEN}}
CTF_SPACE_ID: ${{ secrets.CTF_SPACE_ID }}
CTF_ENVIRONMENT_ID: master
DEBUG_LEVEL: 2 # NOTE: increase this to get more log information


jobs:
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
env:
NODE_ENV: production
steps:
- uses: actions/checkout@v2
- uses: ./
with:
changelist-id: 'changelist-pmrc-1'
cache-dir-path: './.cache'
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ typings/

# dotenv environment variables file
.env
!.env.template
.env.test
.secrets

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down Expand Up @@ -96,4 +98,9 @@ Thumbs.db

# Ignore built ts files
__tests__/runner/*
lib/**/*
lib/**/*

# IDE Files
*.iml
.idea
.vscode
40 changes: 33 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
name: 'Your name here'
description: 'Provide a description here'
author: 'Your name or organization here'
name: 'Contentful Deployment Action'
description: 'Composite Github Action to run a custom Nuxt/Contentful deployment process'
author: 'yan.kisen@coresecure.com'
inputs:
milliseconds: # change this
required: true
description: 'input description here'
default: 'default value if applicable'
cache-dir-path:
required: false
description: 'Directory path where generated files will be saved Defaults to `./.cache`'
default: './.cache'
ctf-file-name:
required: false
description: 'Contentful Sync data filename. Defaults to `syncCollection.json'
default: 'syncCollection.json'
gh-file-name:
required: false
description: 'Github Context data filename. Defaults to `ghContext.json'
default: 'ghContext.json'
changelist-id:
required: false
description: 'Changelist ID to be queried & then overlayed on top of the initial Contentful Sync'
ctf-environment-id:
required: false
description: 'Contentful environment name. (NOTE: until further notice, this will always be "master")'
default: 'master'
use-preview-api:
required: false
description: 'If "true", the Sync operation is performed against the Content Preview API. (NOTE: This will disregard any input provided for the `changelist-id`)'
## TODO: surely we can think of something to output...
# outputs:
runs:
using: 'node12'
main: 'dist/index.js'
branding:
# NOTE: All icons here: https://haya14busa.github.io/github-action-brandings/ https://feathericons.com/
# NOTE: colors: ['white', 'yellow', 'blue', 'green', 'orange', 'red', 'purple', 'gray-dark']
color: 'orange'
icon: 'upload-cloud'

0 comments on commit 382b6e0

Please sign in to comment.