add meikarta and citra raya ads worker #70
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Apps Script | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'latest' # Specifies the latest version of Node.js | |
- name: Cache Node.js modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm # Location of the Node.js cache | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install clasp globally | |
run: npm install -g @google/clasp | |
- name: Insert config to main folder | |
run: echo $CLASP_SETTINGS_JSON > .clasprc.json & echo $CLASP_JSON > .clasp.json | |
env: | |
CLASP_SETTINGS_JSON: ${{ secrets.clasprc_json }} | |
CLASP_JSON: ${{ secrets.clasp_json }} | |
- name: Clasp push | |
run: clasp -A ./.clasprc.json -P ./.clasp.json push -f | |
- name: Clasp deploy | |
run: clasp -A ./.clasprc.json -P ./.clasp.json deploy -i ${{ secrets.DEPLOY_ID }} -d "${{ github.event.head_commit.message }}" | |
# - name: Deploy to Apps Script | |
# uses: daikikatsuragawa/clasp-action@v1.1.0 | |
# with: | |
# accessToken: ${{ secrets.ACCESS_TOKEN }} | |
# idToken: ${{ secrets.ID_TOKEN }} | |
# refreshToken: ${{ secrets.REFRESH_TOKEN }} | |
# clientId: ${{ secrets.CLIENT_ID }} | |
# clientSecret: ${{ secrets.CLIENT_SECRET }} | |
# scriptId: ${{ secrets.SCRIPT_ID }} | |
# deployId: ${{ secrets.DEPLOY_ID }} | |
# rootDir: "./" | |
# command: 'deploy' |