Commit 23e8d4b5 authored by Laurent Sittler's avatar Laurent Sittler ©
Browse files

Update deployment task

parent 69f05617
image: node:latest
image: node:10
stages:
- .pre
......@@ -42,10 +42,12 @@ build:
paths:
- dist/
deploy:
deploy_prod:
stage: deploy
script:
- npm run deploy
environment:
name: production
when: manual
only:
- master
\ No newline at end of file
10
\ No newline at end of file
10.24.0
\ No newline at end of file
......@@ -130,11 +130,12 @@ async function deploy(done) {
const url = process.env.GHOST_API_URL || env.parsed.GHOST_API_URL;
const admin_api_key = process.env.GHOST_ADMIN_API_KEY || env.parsed.GHOST_ADMIN_API_KEY;
const themeName = process.env.THEME_NAME || require('./package.json').name;
const apiVersion = process.env.API_VERSION || require('./package.json').engines['ghost-api'];
const zipFile = `dist/${themeName}.zip`;
const api = new GhostAdminApi({
url,
key: admin_api_key,
version: 'v4'
version: apiVersion
});
await api.themes.upload({ file: zipFile });
......
{
"name": "fluent-ui",
"description": "A Ghost Theme based on Microsoft Fluent UI Framework and Microsoft SharePoint design",
"version": "0.1.1",
"version": "0.1.3",
"engines": {
"ghost": ">=3.0.0",
"ghost-api": "v4"
......@@ -44,9 +44,8 @@
"build": "gulp build",
"deploy": "gulp deploy"
},
"dependencies": {},
"devDependencies": {
"@tryghost/admin-api": "^1.3.6",
"@tryghost/admin-api": "^1.4.0",
"autoprefixer": "^10.2.5",
"beeper": "^2.1.0",
"cssnano": "4.1.10",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment