bephrem
bephrem
RRailway
Created by bephrem on 11/26/2023 in #✋|help
Not In a git Directory
updated (had to run git submodule add for the submodule to pull, odd because .gitmodules should be in the file tree, but I don't think git init pulls that data into the fresh .git folder's data)
async function cloneCms() {
const orgName = '__redacted';
const repoName = 'cms';
const submodulePath = repoName;

const githubAccessToken = config.github.accessToken;
const cloneUrl = `https://${githubAccessToken}@github.com/${orgName}/${repoName}.git`;

try {
if (config.isProduction) {
await execAsync('git init');
await execAsync(`git submodule add ${cloneUrl} ${submodulePath}`);
}

await execAsync('git submodule update --init --recursive');

logger.info('cms cloned successfully.');
} catch (err) {
logger.error('failed to clone cms.', err);
}
}
async function cloneCms() {
const orgName = '__redacted';
const repoName = 'cms';
const submodulePath = repoName;

const githubAccessToken = config.github.accessToken;
const cloneUrl = `https://${githubAccessToken}@github.com/${orgName}/${repoName}.git`;

try {
if (config.isProduction) {
await execAsync('git init');
await execAsync(`git submodule add ${cloneUrl} ${submodulePath}`);
}

await execAsync('git submodule update --init --recursive');

logger.info('cms cloned successfully.');
} catch (err) {
logger.error('failed to clone cms.', err);
}
}
13 replies
RRailway
Created by bephrem on 11/26/2023 in #✋|help
Not In a git Directory
adding a await execAsync('git init'); as first command
13 replies
RRailway
Created by bephrem on 11/26/2023 in #✋|help
Not In a git Directory
yes git init worked - command now runs
13 replies
RRailway
Created by bephrem on 11/26/2023 in #✋|help
Not In a git Directory
right
13 replies
RRailway
Created by bephrem on 11/26/2023 in #✋|help
Not In a git Directory
will try this - I originally thought that the git binary just wasn't there
13 replies
RRailway
Created by bephrem on 11/26/2023 in #✋|help
Not In a git Directory
pretty sure if I just ran a normal git clone everything works (which makes sense considering that doesn't assume an initialized git repository)
13 replies
RRailway
Created by bephrem on 11/26/2023 in #✋|help
Not In a git Directory
maybe I need to run git init
13 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
final working action script (edited):
name: Deploy to Production on Railway

on:
push:
branches: [master]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node 19
uses: actions/setup-node@v4
with:
node-version: 19.x

- name: Install Railway CLI
run: npm i -g @railway/cli

- name: Deploy
run: railway up --service ${{ secrets.RAILWAY_SERVICE_ID_PROD }} --environment production
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN_PROD }}
name: Deploy to Production on Railway

on:
push:
branches: [master]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node 19
uses: actions/setup-node@v4
with:
node-version: 19.x

- name: Install Railway CLI
run: npm i -g @railway/cli

- name: Deploy
run: railway up --service ${{ secrets.RAILWAY_SERVICE_ID_PROD }} --environment production
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN_PROD }}
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
ah looks like i need node 16 (lemme try node-version: 16.x)
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
investigating why this is failing
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
name: Deploy to Production on Railway

on:
push:
branches: [master]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node 12
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install Railway CLI
run: npm i -g @railway/cli

- name: Deploy
run: railway up
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN_PROD }}
name: Deploy to Production on Railway

on:
push:
branches: [master]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node 12
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install Railway CLI
run: npm i -g @railway/cli

- name: Deploy
run: railway up
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN_PROD }}
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
No description
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
Will look into a custom github action 👍 (via https://blog.railway.app/p/github-actions)
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
No description
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
No description
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
Would be really great to have this - without the ability to setup CD in 1-click sort of reduces the magic of things
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
w/ Vercel I can connect my github to multiple accounts for auto-deployment
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
So the only way I can auto-connect GitHub for auto-pushes is to break the 1-1 mapping
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
My github acct controls both Github orgs (which control the private repositories)
25 replies
RRailway
Created by bephrem on 11/22/2023 in #✋|help
GitHub account is already connected to a Railway account
I have 2 organizations each with Railway accounts (as well as a Railway account under my own personal email - I believe)
25 replies