Skip to content

Commit

Permalink
fix: remove yarn/master refs
Browse files Browse the repository at this point in the history
  • Loading branch information
aotearoan committed Apr 23, 2023
1 parent 3799054 commit 7e62787
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 40 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/gh-pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: Deploy to github pages
on:
push:
branches: [ master ]
branches: [ main ]
jobs:
gh-pages-deploy:
name: Deploying to gh-pages
runs-on: ubuntu-latest
steps:
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 12.x
- name: Checkout branch
uses: actions/checkout@v2
- name: Clean install dependencies
run: yarn install --frozen-lockfile
- name: Run deploy script
run: |
git config user.name "aotearoan" && git config user.email "andrew@aotearoan.com"
yarn run gh-pages-deploy
- name: Set up Node.js
uses: actions/setup-node@main
with:
node-version: 12.x
- name: Checkout branch
uses: actions/checkout@v2
- name: Clean install dependencies
run: npm install
- name: Run deploy script
run: |
git config user.name "aotearoan" && git config user.email "andrew@aotearoan.com"
npm run gh-pages-deploy
18 changes: 9 additions & 9 deletions .github/workflows/publish-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: Publish to npm

on:
push:
branches: [ master ]
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn install --frozen-lockfile
node-version: latest
- run: npm install

publish-npm:
needs: build
Expand All @@ -20,10 +20,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: latest
registry-url: https://registry.npmjs.org/
- run: yarn install --frozen-lockfile
- run: yarn run build
- run: npm install
- run: npm run build
- run: npm pack
- run: |
VERSION=$(jq -r .version package.json)
Expand All @@ -38,10 +38,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: latest
registry-url: https://npm.pkg.github.com/
- run: yarn install --frozen-lockfile
- run: yarn run build
- run: npm install
- run: npm run build
- run: npm pack
- run: |
VERSION=$(jq -r .version package.json)
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ node_modules

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
Expand Down
28 changes: 14 additions & 14 deletions gh-pages-deploy.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
const execa = require('execa');
const fs = require('fs');
const execa = require("execa");
const fs = require("fs");

(async () => {
try {
await execa('git', ['checkout', '--orphan', 'gh-pages']);
console.log('Building...');
await execa('npm', ['run', 'build-pages']);
await execa("git", ["checkout", "--orphan", "gh-pages"]);
console.log("Building...");
await execa("npm", ["run", "build-pages"]);
// Understand if it's dist or build folder
const folderName = fs.existsSync('dist') ? 'dist' : 'build';
await execa('git', ['--work-tree', folderName, 'add', '--all']);
await execa('git', ['--work-tree', folderName, 'commit', '-m', 'gh-pages']);
console.log('Pushing to gh-pages...');
await execa('git', ['push', 'origin', 'HEAD:gh-pages', '--force']);
await execa('rm', ['-r', folderName]);
await execa('git', ['checkout', '-f', 'master']);
await execa('git', ['branch', '-D', 'gh-pages']);
console.log('Successfully deployed');
const folderName = fs.existsSync("dist") ? "dist" : "build";
await execa("git", ["--work-tree", folderName, "add", "--all"]);
await execa("git", ["--work-tree", folderName, "commit", "-m", "gh-pages"]);
console.log("Pushing to gh-pages...");
await execa("git", ["push", "origin", "HEAD:gh-pages", "--force"]);
await execa("rm", ["-r", folderName]);
await execa("git", ["checkout", "-f", "main"]);
await execa("git", ["branch", "-D", "gh-pages"]);
console.log("Successfully deployed");
} catch (e) {
console.log(e.message);
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aotearoan/neon",
"description": "Neon is a lightweight design library of Vue 3 components with minimal dependencies.",
"version": "9.2.0",
"version": "9.2.1",
"main": "./dist/neoon.cjs.js",
"module": "dist/neon.es.js",
"types": "dist/neon.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/source/Source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineComponent({
template.value = file;
});
});
ghLink.value = `https://github.com/aotearoan/neon/tree/master/src/common${to}.ts`;
ghLink.value = `https://github.com/aotearoan/neon/tree/main/src/common${to}.ts`;
}
},
{ immediate: true },
Expand Down

0 comments on commit 7e62787

Please sign in to comment.