git submodule add
.gitmodules
git init
.git
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); }}
await execAsync('git init');
git
git clone
name: Deploy to Production on Railwayon: 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 }}
node-version: 16.x
name: Deploy to Production on Railwayon: 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 }}