diff --git a/.github/actions/setup-and-validate/action.yml b/.github/actions/setup-and-validate/action.yml new file mode 100644 index 000000000..431cdc864 --- /dev/null +++ b/.github/actions/setup-and-validate/action.yml @@ -0,0 +1,21 @@ +name: "Theme Validation" +description: "Validate the themes" +runs: + using: "composite" + steps: + - name: Set up Node.js + uses: actions/setup-node@v1.4.6 + with: + node-version: '16' + + - name: install deps + run: npm ci + shell: bash + + - name: create generated dir + run: mkdir ./assets/generated + shell: bash + + - name: Prepare deploy + run: npm run prepare-deploy + shell: bash diff --git a/.github/workflows/deploy_pietervdvn.yml b/.github/workflows/deploy_pietervdvn.yml index 9a2cf8c7c..c4b796ff6 100644 --- a/.github/workflows/deploy_pietervdvn.yml +++ b/.github/workflows/deploy_pietervdvn.yml @@ -8,24 +8,8 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v1.2.0 - with: - node-version: '16' - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - - - name: install deps - run: npm ci - - - name: create generated dir - run: mkdir ./assets/generated - - - name: create stub themes - run: "echo '{\"layers\": [], \"themes\": []}' > ./assets/generated/known_layers_and_themes.json" - - - name: Prepare deploy - run: npm run prepare-deploy + - name: Setup and validate themes + uses: ./.github/actions/setup-and-validate - name: Clone deployment repo env: diff --git a/.github/workflows/theme_validation_and_deploy.yml b/.github/workflows/theme_validation_and_deploy.yml index 76ccd8159..56c390297 100644 --- a/.github/workflows/theme_validation_and_deploy.yml +++ b/.github/workflows/theme_validation_and_deploy.yml @@ -10,21 +10,8 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v1.2.0 - with: - node-version: '16' - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - - - name: install deps - run: npm ci - - - name: create generated dir - run: mkdir ./assets/generated - - - name: Prepare deploy - run: npm run prepare-deploy + - name: Setup and validate themes + uses: ./.github/actions/setup-and-validate - name: Clone deployment repo env: